#!/usr/bin/python

from system.core.model import Model
from mscheduler import SchedulerRecord

"""
Class       : SchedulerModel
Description : scheduler model
"""

class Scheduler(Model):

    """
    constructor: constructor of Scheduler Model
    """
    def __init__(self, dbSession):
        super(Scheduler, self).__init__(dbSession)
        return


    """
    fetch_all_schedulers: get all schdulers record from database
    """
    def fetch_all_schedulers(self):
        schedulers = self.dbSession.query(SchedulerRecord).filter_by(is_active='true').all()
        return schedulers
